package com.shanling.shanlingcontroller.http;

import com.shanling.shanlingcontroller.bean.ApptokenBean;
import com.shanling.shanlingcontroller.bean.CsrUP2OTABean;
import com.shanling.shanlingcontroller.bean.CsrUP4OTABean;
import com.shanling.shanlingcontroller.bean.LoginBean;
import com.shanling.shanlingcontroller.bean.VerificationcodeBean;

import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by ch1 on 2019/9/26.
 */

public interface DeviceApi {

    //获取apptoken
    @POST("api/getAppToken")
    @FormUrlEncoded
    Observable<BaseResult<ApptokenBean>> getToken(@FieldMap Map<String, String> map);





    //登录
    @FormUrlEncoded
    @POST("api/user/login")
    Observable<BaseResult<LoginBean>> doLogin(@FieldMap Map<String, String> map);



    //注册
    @FormUrlEncoded
    @POST("api/user/register")
    Observable<BaseResult<String>> doRegist(@FieldMap Map<String, String> map);



    //获取验证码
    @FormUrlEncoded
    @POST("api/user/getValidCode")
    Observable<BaseResult<VerificationcodeBean>> getValidCode(@FieldMap Map<String, String> map);

    //忘记密码
    @FormUrlEncoded
    @POST("api/user/resetPwd")
    Observable<BaseResult<String>> resetPwd(@FieldMap Map<String, String> map);



    //微信登录
    @FormUrlEncoded
    @POST("api/user/wxlogin")
    Observable<BaseResult<LoginBean>> LoginWX(@FieldMap Map<String, String> map);


    //修改密码
    @FormUrlEncoded
    @POST("api/user/updatePwd")
    Observable<BaseResult<String>> doChange(@FieldMap Map<String, String> map);



    //退出登录
    @FormUrlEncoded
    @POST("api/user/logout")
    Observable<BaseResult<String>> logout(@FieldMap Map<String, String> map);




}
